define(function(require, exports, module) { 
	"require:nomunge,exports:nomunge,module:nomunge";

    var service = require('./service');
    var self = exports;
    
    self.list = [];
    self.args = {
		type: 0,
		objId: 0,
		pageIndex: 1,
		pageSize: 5,
		maxChSize: 5
    };
    
	//获取留言列表
    self.getList = function(objId, callback){
    		this.args.objId = objId;
        service.getCommentList(this.args, function(rs, err) {   	
            if (err && callback) return callback(err.message || err);
            if (rs.success) {
               	self.list = rs.obj;
                if (callback) callback();
            } else {
                rs = rs || {};
                var msg = rs.msg || 'unknow error';
                if (callback) callback(msg);
            }
        });    	
    };	
	
});